<?
	require_once('../inc.php');
	if(isset($_REQUEST['id']))
	{
		$results = GetContactMethods2($_REQUEST['id']);
	}
	else
	{
		$results = GetContactMethods();
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js">
	</script>
    <style type="text/css">
		.high
		{
			background-color: #E09999;
			font-size: 8px;
		}
		.row
		{
			clear: both;
		}
		.cell, form div
		{
			width: 150px;
			float: left;
		}
		label { display: none; }
		form { padding-left: 150px; }
	</style>
    <script type="text/javascript">
	<!-- jQuery should always be wrapped in a 'ready' -->
		$(document).ready(function() <!-- '$' returns the document -->
		{
			$(".row:last").load('editCM.php form');
			$("a.edit").click(function()
			{
				var url = this.href;
				$(this).parents(".row").slideUp('slow', function()
				{
					$(this).load(url + 'form').slideDown('slow');
				});
				return false;
			});
			$("form").live('submit',function()
			{
				var url = "../ContactMethod/editCM.php";
				var form = this;
				$(this).parents(".row").slideUp('slow', function()
				{
					$(this).load(url, $(form).serialize()).slideDown('slow');
				});
				return false;
			});
		});
	</script>
</head>

<body>
<a href="../ContactMethod/editCM.php">Create New</a>
<?=$conn->connect_error ?>
	<div class="table">
    	<? while($rs = $results->fetch_assoc()){ ?>
        	<? include 'item.php'; ?>
        <? } ?>
        <div class="row">
        	
        </div>
    </div>
</body>
</html>
<? // $conn->close(); ?>